﻿@using Abc.Core;
@using Abc.Core.Entities;
@using Abc.Application;
@model Abc.Application.HtAdminServices.HtEmailSendConfigOut;


@{
    ViewData["Title"] = "邮件发送配置";
}



<section class="panel panel-padding">
    <div class="layui-tab layui-tab-brief" lay-filter="TabBrief_EmailSendConfig">

        <form class="layui-form" action="" id="from_EmailSendConfig">
            <input type="hidden" asp-for="Id" />

            <table class="layui-table">
                <tbody>

                    <tr>
                        <td width="200px;">SMTP服务器</td>
                        <td>

                            <input asp-for="EmailSmtpHost" lay-verify="EmailSmtpHost" autocomplete="off" placeholder="请输入SMTP服务器" class="layui-input">
                        </td>
                    </tr>
                    <tr>
                        <td width="200px;">邮件服务器Smtp端口</td>
                        <td>

                            <input asp-for="EmailSmtpPort" lay-verify="EmailSmtpPort" autocomplete="off" placeholder="请输入邮件服务器Smtp端口" class="layui-input">
                        </td>
                    </tr>
                    <tr>
                        <td width="200px;">邮箱账号</td>
                        <td>

                            <input asp-for="EmailAccount" lay-verify="EmailAccount" autocomplete="off" placeholder="请输入邮箱账号" class="layui-input">
                        </td>
                    </tr>
                    <tr>
                        <td width="200px;">邮箱密码</td>
                        <td>

                            <input asp-for="EmailPassword" lay-verify="EmailPassword" autocomplete="off" placeholder="请输入邮箱密码" class="layui-input">
                        </td>
                    </tr>
                    <tr>
                        <td width="200px;">发送者显示名</td>
                        <td>

                            <input asp-for="EmailDisplayName" lay-verify="EmailDisplayName" autocomplete="off" placeholder="请输入发送者显示名" class="layui-input">
                        </td>
                    </tr>
                    <tr>
                        <td width="200px;">是否启用</td>
                        <td>

                            <input type="checkbox" asp-for="IsEnable" lay-skin="switch" title="开|关">
                        </td>
                    </tr>
                    <tr>
                        <td width="200px;">是否包含Html代码</td>
                        <td>

                            <input type="checkbox" asp-for="EmailIsHtml" lay-skin="switch" title="开|关">
                        </td>
                    </tr>

                    <tr>
                        <td width="200px;">是否启用SSL加密</td>
                        <td>

                            <input type="checkbox" asp-for="EmailIsSsl" lay-skin="switch" title="开|关">
                        </td>
                    </tr>
                    <tr>
                        <td width="200px;">备注</td>
                        <td>

                            <textarea class="layui-textarea" asp-for="Remark" lay-verify="required|remark"></textarea>
                        </td>
                    </tr>
                    @*
                    <textarea placeholder="请输入内容" class="layui-textarea"></textarea>
                    <input type="radio" name="sex" value="男" title="男" checked="">
                    <input type="radio" name="sex" value="女" title="女">
                    <input type="radio" name="sex" value="禁" title="禁用" disabled="">
                    *@
                    <tr>
                        <td></td>
                        <td>
                            <div class="layui-btn submitbtn" lay-submit lay-filter="submit">立即提交</div>
                            <div class="layui-btn layui-btn-danger closewindow">关闭窗口</div>
                            <div class="layui-btn layui-btn-danger refreshwindow">重新加载</div>
                        </td>
                    </tr>

                </tbody>
            </table>



        </form>
    </div>
</section>


@section Scripts{
    <script>
        layui.define(['element', 'jquery', 'form'], function () {
            let $ = layui.jquery;
            let form = layui.form;
            let element = layui.element;

            abc.infoInit();
            //提交
            form.on('submit(submit)', function (obj) {
                //obj.field.IsEnable=$('#IsEnable').is(':checked');
                //obj.field.Remark = Remark.getContent();
                abc.post({
                    url: '@(Url.Action("Edit", new { area = "HtAdmin" }))', data: obj.field
                    //,submitbtn:'submitbtn' //提交的按钮
                    //,isAutoEnableBtn:false //不自动启用按钮
                    //,IsSuccessCloseWindow:false //不关闭
                });

                return false;
            });


        });
    </script>
}

